<template>
    <div class="mac_pop_bg" v-if="isshow">
        <div class="mac_pop">
            <div class="pop_top"><h2>用户登录</h2><span class="pop_close" @click="close">Ｘ</span></div>
            <div class="pop_content">
                <div class="hl-login">
                    <div class="hl-loginwrap">
                        <div class="hl-reg-wrap mac_login">
                            <form class="hl-reg-form mac_login_form" method="post" id="fm" action="">
                                <div class="hl-reg-group login_form_group">
                                    <label>账号</label><input type="text" name="user_name"
                                                            class="hl-reg-control mac_u_name" v-model="ucount"
                                                            placeholder="输入手机号或登录账号">
                                </div>
                                <div class="hl-reg-group login_form_group">
                                    <label>密码</label><input type="password" name="user_pwd"
                                                            class="hl-reg-control mac_u_pwd" v-model="password"
                                                            placeholder="输入您的登录密码">
                                </div>
                                <input type="button" class="hl-btn-submit hl-bg-conch login_form_submit" @click="login" :value="state">
                            </form>
                            <div class="hl-reg-go clearfix">
                                <a class="hl-pull-left" href="/findpass.html">忘记密码</a>
                                <a class="hl-pull-right" href="/reg.html">还没有账号？<span
                                        class="hl-text-conch">注册账号</span></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    module.exports = {
        props: {
            state: String
        },
        data: function() {
            return {
                isshow: true,
                ucount: '',
                password: '',
            };
        },
        methods: {
            close() {
                this.isshow = false;
                this.$emit('downshowlogin');
            },
            login(){
                this.$emit('login',this.ucount,this.password);
            },
        }
    };
</script>

<style scoped>
    .mac_pop{
        width: 430px; height: 410px;
    }
</style>
